<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
 	<base href="<%=basePath%>">
    <title>注册界面</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta charset="UTF-8"/>
     <script>
        window.onload=function () {
            var oYz = document.getElementById('yzimage');
            oYz.onclick=function () {
       			 oYz.src="${pageContext.request.contextPath}/imageServlet?K="+Math.random();                                                      
            };
            var oDiv = document.getElementById('change');
            oYz.onmouseover=function() {
            	oDiv.style.display="inline";
            };
            oYz.onmouseout=function() {
            	oDiv.style.display="none";
            }
            
        };
    </script>
   <style>
   		
   		body {
			margin:0px;
			padding:0px;
			background-color:#156493;
			text-align:left;
		}
		#container {
			position:relative;
			margin:0px;
			padding:0px;
		}
		
		#image {
			
			margin:0px;
			padding:0px;
			width:1278px;
			height:70px;
			background-image:url(WEB-INF/source/head.gif);
		}
		#a1 {
			margin-top:50px;
			margin-left:155px;
			font-size:20px;
			color:#FFFFCC;
		}
		#a2 {
			text-align:left;
			color:#FFFFCC;
			margin-top:30px;
			margin-left:150px;
			font-size:12px;
		}
		#form {
			margin-top:50px;
			margin-left:150px;
			color:#FFFFCC;
		}
		.text{
			width:250px;
			margin-left:50px;
		}
		.text2{
			width:250px;
			margin-left:90px;
		}
		#form #name1 {
			margin-left:20px;
			font-size:12px;
		}
		.yzm {
			width:90px;
			margin-left:76px;
		}
		#submit {
			
			margin-left:370px;
			width:70px;
			height:30px;
			margin-bottom:100px;
		}
		#yzimage {
			height:25px;
			width:104px;
			margin-top:10px;
	
		}
		#change {
			height:20px;
			width:100px;
			display: none;
		}
   </style>

  </head>
  
  <body>
 
  <div id="container">
    	<div id="image">
		</div>
		<div id="a1">注册须知：</div>
		<div id="a2">
			1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br/><br>
			2.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br/><br/>
			XXXXXXXXXXXXXXXXXXXXXX。
		</div>
		<div id="form">
			<form action="${pageContext.request.contextPath}/RegisterServlet" method="post">
				登陆账号：<input class="text" type="text" name="username" value="${form.username}"/>
				<a id="name1">${form.errors.username}</a><%--EL表达式要获取属性，这个属性必须生成get/set方法 --%>
					<br/><br/>
				输入密码：<input class="text" type="password" name="password" value="${form.password}"/>
				<a id="name1">${form.errors.password}</a>
					<br/><br/>
				确认密码：<input class="text" type="password" name="password2" value="${form.password2}"/>
					<a id="name1">${form.errors.password2}</a><br/><br/>
				电子邮箱：<input class="text" type="text" name="email" value="${form.email}"/>
					<a id="name1">${form.errors.email}</a><br/><br/>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生日：<input class="text" type="text" name="birthday" value="${form.birthday}"/>
					<a id="name1">${form.errors.birthday}</a><br/><br/>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;昵称：<input class="text" type="text" name="nicname" value="${form.nicname}"/>
					<a id="name1">${form.errors.nicname}</a><br/><br/>
				&nbsp;&nbsp;验证码：<input class="yzm" type="text" name="yzm" />
				&nbsp;&nbsp;&nbsp;&nbsp;
				<img  id="yzimage" src="${pageContext.request.contextPath }/imageServlet" alt="换一张" style="cursor:pointer;" />
				<div id="change"><a id="name1">看不清？点击图片换一张</a></div>
				
				
				<a id="name1">${form.errors.check}</a><br/>
				<input id="submit" type="submit" value="注册"/>
			</form>
		</div>
  </div>
  </body>
</html>
